package com.zx.cloud.controller.client;


import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.domain.ClientContact;
import com.zx.cloud.domain.ClientInfo;
import com.zx.cloud.domain.Proposal;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

import feign.Headers;

/**
 * @Description:
 *
 * @author       Yan Weiwei
 * @Create Time: 2017年11月1日下午1:35:28
 */
@FeignClient(name = ClientInfoClient.SERVICE_ID, fallback = ClientInfoClientFallback.class)
public interface ClientInfoClient {

	/**
     * eureka service name
     */
    String SERVICE_ID = "trade-provider";
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/queryClientInfo", method = RequestMethod.POST)
    ObjectDataResponse<Page<Object>> queryClientInfo(ClientInfo clientInfo);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/queryClientInfoById", method = RequestMethod.POST)
    ObjectDataResponse<ClientInfo> queryClientInfoById(String tableId);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/queryClientContact", method = RequestMethod.POST)
    ObjectDataResponse<List<ClientContact>> queryClientContact(String tableId);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/queryClientAuth", method = RequestMethod.POST)
    ObjectDataResponse<Page<ClientInfo>> queryClientAuth(ClientInfo clientInfo);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/updateClientInfo", method = RequestMethod.POST)
    ObjectDataResponse<Integer> updateClientInfo(ClientInfo clientInfo);
    
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/clientInfo/addClientInfo", method = RequestMethod.POST)
    ObjectDataResponse<Integer> addClientInfo(ClientInfo clientInfo);
    
    /**
     * 
     * @param gmc
     * @param 获取反馈信息
     * @return
     */
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/queryProposal", method = RequestMethod.POST)
    ObjectDataResponse<Page<Proposal>> queryProposal(Proposal proposal);

    /**
     * 
     * @param gmc
     * @param 修改意见反馈信息
     * @return
     */
    @Headers("X-Auth-Token:{X-Auth-Token}")
    @RequestMapping(value =ApiVersion.PROVIDER_V1_PREFIX+"/client/updateProposal", method = RequestMethod.POST)
    ObjectDataResponse<Integer> updateProposal(Proposal proposal);
}
